<?php
//for stock
error_reporting(E_ALL);
	try {
		$url = "http://api.dddadmin.com/StockService.svc?wsdl";
		$client = new SoapClient($url);
		
		$shopid = "855001";
		$myKey	= "vkal29xcjs81lslc8qlxpgg63anxaqk2ixkskxm19m";
		
		$params['clientid'] = "855001";
		$params['psk'] = "vkal29xcjs81lslc8qlxpgg63anxaqk2ixkskxm19m";
		
		
		$articles = $client->GetWebshopArticles($params);
		$strInfo = ($articles->GetWebshopArticlesResult);
		$arrInfo = json_decode($strInfo);
		
		
		$file = fopen(dirname(__FILE__) . "/cache.txt", 'w');
		fwrite($file, serialize($arrInfo));
		fclose($file);
		
		
		
	}
	catch (SoapFault $exception) {
		echo $exception->getMessage();
	}
?>
